package com.zlyx.easy.mybatis.mapper;

import java.util.List;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.zlyx.easy.mybatis.mapper.provider.MybatisSqlProvider;

/**
 * @Auth 赵光
 * @Describle 拥有直接执行SQL语句的通用Mapper接口
 * @2019年1月7日 下午12:55:56
 */
@Mapper
public interface MybatisMapper {

	@SelectProvider(method = MybatisSqlProvider.PAGE, type = MybatisSqlProvider.class)
	public List<?> page(String sql, int pageSize, int pageNum);

	@SelectProvider(method = MybatisSqlProvider.SQL, type = MybatisSqlProvider.class)
	public List<?> select(String sql);

	@SelectProvider(method = MybatisSqlProvider.SQL, type = MybatisSqlProvider.class)
	public Object selectOne(String sql);

	@UpdateProvider(method = MybatisSqlProvider.SQL, type = MybatisSqlProvider.class)
	public int update(String sql);

	@DeleteProvider(method = MybatisSqlProvider.SQL, type = MybatisSqlProvider.class)
	public int delete(String sql);

	@InsertProvider(method = MybatisSqlProvider.SQL, type = MybatisSqlProvider.class)
	public int insert(String sql);
}
